return path;
}
+static void
+update_properties (GtkStyleContext *context,
+ GtkCssStyle *style,
+ const GtkCssNodeDeclaration *decl,
+ const GtkBitmask *relevant_changes)
+{
+ GtkStyleContextPrivate *priv;
+ GtkCssMatcher matcher;
+ GtkWidgetPath *path;
+ GtkCssLookup *lookup;
+
+ priv = context->priv;
+
+ path = create_query_path (context, decl);
+ lookup = _gtk_css_lookup_new (relevant_changes);
+
+ if (_gtk_css_matcher_init (&matcher, path))
+ _gtk_style_provider_private_lookup (GTK_STYLE_PROVIDER_PRIVATE (priv->cascade),
+ &matcher,
+ lookup,
+ NULL);
+
+ _gtk_css_lookup_resolve (lookup,
+ GTK_STYLE_PROVIDER_PRIVATE (priv->cascade),
+ priv->scale,
+ GTK_CSS_STATIC_STYLE (style),
+ priv->parent ? style_values_lookup (priv->parent) : NULL);
+
+ _gtk_css_lookup_free (lookup);
+ gtk_widget_path_free (path);
+}
+
static void
build_properties (GtkStyleContext *context,
GtkCssStyle *style,
const GtkCssNodeDeclaration *decl,
- const GtkBitmask *relevant_changes,
GtkCssChange *out_change)
{
GtkStyleContextPrivate *priv;
priv = context->priv;
path = create_query_path (context, decl);
- lookup = _gtk_css_lookup_new (relevant_changes);
+ lookup = _gtk_css_lookup_new (NULL);
if (_gtk_css_matcher_init (&matcher, path))
_gtk_style_provider_private_lookup (GTK_STYLE_PROVIDER_PRIVATE (priv->cascade),
gtk_css_node_declaration_ref (info->decl),
g_object_ref (values));
- build_properties (context, values, info->decl, NULL, NULL);
+ build_properties (context, values, info->decl, NULL);
}
else
{
values = gtk_css_animated_style_new ();
- build_properties (context, GTK_CSS_ANIMATED_STYLE (values)->style, info->decl, NULL, &priv->relevant_changes);
+ build_properties (context, GTK_CSS_ANIMATED_STYLE (values)->style, info->decl, &priv->relevant_changes);
/* These flags are always relevant */
priv->relevant_changes |= GTK_CSS_CHANGE_SOURCE;
}
decl = gtk_css_node_declaration_ref (context->priv->info->decl);
gtk_css_node_declaration_set_state (&decl, state);
values = gtk_css_static_style_new ();
- build_properties (context, values, decl, NULL, NULL);
+ build_properties (context, values, decl, NULL);
gtk_css_node_declaration_unref (decl);
return values;
changes = gtk_css_style_compute_dependencies (values, parent_changes);
if (!_gtk_bitmask_is_empty (changes))
- build_properties (context, values, decl, changes, NULL);
+ update_properties (context, values, decl, changes);
_gtk_bitmask_free (changes);
}
{
changes = gtk_css_style_compute_dependencies (current, parent_changes);
if (!_gtk_bitmask_is_empty (changes))
- build_properties (context, GTK_CSS_ANIMATED_STYLE (current)->style, info->decl, changes, NULL);
+ update_properties (context, GTK_CSS_ANIMATED_STYLE (current)->style, info->decl, changes);
gtk_style_context_update_cache (context, parent_changes);
}